package com.finance.capacity.common.capService;

import com.finance.capacity.common.bean.pojo.CapOrganization;
import com.finance.capacity.common.capDao.CapOrganizationMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author: gly
 * @Date: Created in 2017-08-29
 */
@Service("capOrganizationService")
public class CapOrganizationService implements ICapOrganizationService {
    @Autowired
    private CapOrganizationMapper capOrganizationMapper;
    @Override
    public List<CapOrganization> provinceCompanies() {
        return capOrganizationMapper.provinceCompanies();
    }

    @Override
    public List<CapOrganization> cityCompanies(String provinceCompanyCode) {
        return capOrganizationMapper.cityCompanies(provinceCompanyCode);
    }

    @Override
    public List<CapOrganization> sites(String cityCompanyCode) {
        return capOrganizationMapper.sites(cityCompanyCode);
    }

    @Override
    public List<String> getIdByName(String orgName) {
        return capOrganizationMapper.getIdByName(orgName);
    }

    @Override
    public CapOrganization maintainSiteInfo(String userCode) {
        return capOrganizationMapper.getMaintainSiteInfo(userCode);
    }
}
